package cn.aitrox.ry.service.config.enumtype;

public enum ToolEnum {
    RECTANGLE("RECTANGLE", 2, "矩形");

    private String value;

    private Integer type;

    private String desc;

    ToolEnum(String value, Integer type, String desc) {
        this.value = value;
        this.type = type;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static ToolEnum getEnumByValue(String value) {
        for (ToolEnum toolEnum : ToolEnum.values()) {
            if (toolEnum.getValue().equals(value)) {
                return toolEnum;
            }
        }
        return null;
    }
}
